package com.pc.scrs.bean.po;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import javax.annotation.Generated;

@Data
public class Course implements Serializable {
    private Integer id;
    private String title;
    private Integer teacherId;
    private Integer subjectId;
    private Integer lessonNum;
    private String cover;
    private String description;
    private Integer viewCount;
    private Integer status;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;
    private Integer enable;
    private Integer required;
    private static final long serialVersionUID = 1L;
    /**
     * 关联课程类型
     */
    private Subject subject;
    /**
     * 关联教师
     */
    private Teacher teacher;

    @Override
    public String toString() {
        return "Course{" +
                "id=" + id +
                ", title='" + title + '\'' +
                ", teacherId=" + teacherId +
                ", subjectId=" + subjectId +
                ", lessonNum=" + lessonNum +
                ", cover='" + cover + '\'' +
                ", description='" + description + '\'' +
                ", viewCount=" + viewCount +
                ", status=" + status +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                ", enable=" + enable +
                ", required=" + required +
                '}';
    }
}
